<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
	uri="http://java.sun.com/jsf/core" prefix="f"%><%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="styles/style.css" type="text/css" rel="stylesheet"></link>
<title>Insert title here</title>
</head>
<body>
			
		<div class="mainBackground">
			<div class="innerBackground">
<f:view locale="#{visitInfo.currentUser.locale}">
	<f:loadBundle basename="resources.VisionClickResources" var="msg"/>
	<jsp:include page="nav.jsp"></jsp:include>
	<h:panelGrid border="0" columns="1" cellspacing="5" style="padding-top:20px;">
		<h:panelGroup>
			<div class="table" style="width:960px">
				<div class="tableHead" style="width:960px;">
					<h:form>
					<h:panelGrid border="0" columns="4"  width="960">
					<h:outputText value="#{msg.Project}" style="float:left;"></h:outputText>
					<h:panelGroup style="float:right;">
						<h:commandLink value="+#{msg.CreateProject}" action="create_project" style="margin-right:10px;color:white"></h:commandLink>
					</h:panelGroup>
					</h:panelGrid>
					</h:form>
				</div>

					<h:dataTable border="0" value="#{projectBean.userProjects}" var="project" width="960"  rowClasses="row">
						<h:column id="column1">
							<f:facet name="header">
								<h:outputText value="#{msg.ProjectName}"></h:outputText>
							</f:facet>
							<h:form>
							<h:commandLink value="#{project.projectName}" action="showProject">
								<f:param value="#{project.projectId}" name="projectId"></f:param>
							</h:commandLink>
							</h:form>
						</h:column>
						<h:column id="column2">
							<f:facet name="header">
								<h:outputText value="#{msg.ProjectDesc}"></h:outputText>
							</f:facet>
							<h:outputText value="#{project.projectDesc}"></h:outputText>
						</h:column>
						<h:column id="column3">
							<f:facet name="header">
								<h:outputText value="#{msg.CreateDate}"></h:outputText>
							</f:facet>
							<h:outputText value="#{project.createDate}">
								<f:convertDateTime pattern="yyyy-MM-dd hh:mm:ss"/>
							</h:outputText>
						</h:column>
						<h:column id="column4">
							<f:facet name="header">
								<h:outputText value="#{msg.Creator}"></h:outputText>
							</f:facet>
							<h:outputText value="#{project.creator}">
								<f:converter converterId="userConverter"/>
							</h:outputText>
						</h:column>
					</h:dataTable>					
			</div>		
		</h:panelGroup>
	</h:panelGrid>
	</f:view>
	</div>
	</div>
	</body>
</html>